// KeyBoardController.h: interface for the KeyBoardController class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_KEYBOARDCONTROLLER_H__01221EA2_E830_4168_84C4_F5D7A9B942BA__INCLUDED_)
#define AFX_KEYBOARDCONTROLLER_H__01221EA2_E830_4168_84C4_F5D7A9B942BA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define DIRECTINPUT_VERSION 0x0800
#include "dinput.h"
#include "StructureAndConst.h"

class KeyBoardController  
{
friend class KeySettingDlg;
public:
	KeyBoardController();
	virtual ~KeyBoardController();
	static bool Initialize(HWND hDlg);
	static bool Uninitialize();
	static void Acquire();
	static unsigned __stdcall ReadImmediateData( void* pParam );
private:
	static LPDIRECTINPUT8       m_pDI; // The DirectInput object         
	static LPDIRECTINPUTDEVICE8 m_pKeyboard; // The keyboard device 
	static short m_mapOp2Key[eAllKey];
	static BYTE m_LastKeyState;
	static HANDLE m_hThread;
	static bool m_bRepeatReadKey;
	static HWND m_hDlg;
};

#endif // !defined(AFX_KEYBOARDCONTROLLER_H__01221EA2_E830_4168_84C4_F5D7A9B942BA__INCLUDED_)
